home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
ARASAN_S.ZIP
/
SHOWMOVE.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-19
|
876b
|
39 lines
// Copyright 1994 by Jon Dart. All Rights Reserved.
#include "showmove.h"
ShowMovesDialog::ShowMovesDialog(WPWin *pwin, Log &log)
: the_log(log),
WPDialogModal("SHOWMOVES", pwin, NULL, NULL)
{
createWin();
}
void ShowMovesDialog::initDlg()
{
const HWND hDlg = getHwnd();
HWND hList = GetDlgItem(hDlg,IDP_MOVE_LIST);
int i = 0;
while (i < the_log.num_moves())
{
char msg1[50];
char msg2[50];
char move1[10];
char move2[10];
strcpy(move1,the_log[i].image());
i++;
if (i<the_log.num_moves())
{
strcpy(move2,the_log[i].image());
}
else
*move2 = '\0';
wsprintf(msg1,"%d. %s",(i/2)+1,move1);
if (strlen(msg1) <= 8)
strcat(msg1,"\t");
wsprintf(msg2,"%s\t%s",msg1,move2);
SendMessage(hList,LB_ADDSTRING,0,(LONG)msg2);
i++;
}
}